﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace RSM.Controls
{
    [ToolboxData("<{0}:ExtendedLabelControl runat=server></{0}:ExtendedLabelControl>")]

    public class DoubleLabelExtender : WebControl
    {
        Label lblTitle = new Label();
        Label lblDesc = new Label();

        public string Title
        {
            get { return lblTitle.Text; }
            set { lblTitle.Text = value; }
        }

        public string Descrption
        {
            get { return lblDesc.Text; }
            set { lblDesc.Text = value; }
        }
        public DoubleLabelExtender()
        {
            this.Controls.Add(lblTitle);
            this.Controls.Add(lblDesc);
        }
        protected override void OnLoad(System.EventArgs e)
        {
            base.OnLoad(e);

        }
        public override void RenderControl(HtmlTextWriter writer)
        {
            writer.Write("<table>");
            writer.Write("<tr>");
            writer.Write("<td>");
            lblTitle.RenderControl(writer);
            writer.Write("</td>");
            writer.Write("</tr>");

            writer.Write("<tr>");
            writer.Write("<td>");
            lblDesc.RenderControl(writer);
            writer.Write("</td>");
            writer.Write("</tr>");
            writer.Write("</table>");

            //base.RenderControl(writer);
        }

    }
}
